#*-*coding=utf-8*-*
'''
Created on 22 janv. 2013

@author: tclain
'''
import os

class File(object):
    '''
    Basical File Handler
    '''


    def __init__(self,path):
        '''
        Constructor of the Class. Takes a path which points on a file and open it. Raise an IOError if the file can't be opened
        '''
        self._fpath = path 
        if os.access(path, os.R_OK):
            self._fopened = open(path,"r")
            self._fcontent = self._fopened.read()
        else :
            raise IOError
        self._fopened.close()
        
    def getContent (self):
        '''
        returns the content of 
        '''
        return self._fcontent
    def getPath(self):
        '''
        
        '''
        return self._fpath